﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
 
namespace CMS.Web.Site.Ascx {
	public partial class Paging : System.Web.UI.UserControl {

		/// <summary>
		/// 获取或设置总的记录数
		/// </summary>
		public int RecordCount {
			get;
			set;
		}

		/// <summary>
		/// 获取或设置栏目ID
		/// </summary>
		public int CategoryID {
			get;
			set;
		}

		/// <summary>
		/// 获取或设置每页显示的数据行数
		/// </summary>
		public int PageSize {
			get;
			set;
		}

		/// <summary>
		/// 获取分页数
		/// </summary>
		public int PageCount {
			get {
				return (RecordCount % PageSize == 0) ? (RecordCount / PageSize) : (RecordCount / PageSize + 1);
			}
		}

		/// <summary>
		/// 获取或设置需分页的页面类型, 取 (int)Core.PageType 的值
		/// </summary>
		public int PageType {
			get;
			set;
		}

		/// <summary>
		/// 获取或设置需分页的页面的显示容器, 用于 AJAX 更新
		/// </summary>
		public string ContainerID {
			get;
			set;
		}
	}
}